//
//  FirstAlertView.swift
//  funcode
//
//  Created by Wan Jiading on 2017/9/15.
//  Copyright © 2017年 WanJiading. All rights reserved.
//

import UIKit

class FirstAlertView: BaseAlertView {
    
    convenience init(_ title: String) {
        self.init()
        beforeSetupSubViews()
        
        let titleLabel = UILabel()
        contentView.addSubview(titleLabel)
        titleLabel.text = title
        titleLabel.textAlignment = .center
        titleLabel.font = UIFont.systemFont(ofSize: 12)
        titleLabel.textColor = UIColor.rgb("84a740")
        titleLabel.snp.makeConstraints { (make) in
            make.left.equalTo(contentView.snp.left)
            make.right.equalTo(contentView.snp.right)
            make.top.equalTo(contentView.snp.top)
            make.height.equalTo(100)
        }
        
        // 主题内容背景view
        let screenSize = UIScreen.main.bounds.size
        contentView.center = CGPoint(x: screenSize.width * 0.5, y: screenSize.height * 0.5)
        contentView.snp.makeConstraints { (make) in
            make.centerX.equalTo(self)
            make.centerY.equalTo(self)
            make.width.equalTo(200)
            make.height.equalTo(200)
        }
        
        afterSetupSubviews()
    }
    
}
